package com.sphd.emanu.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sphd.emanu.R;
import com.sphd.emanu.pojo.goods.Commodity;

import java.util.List;

/**
 * @Author Hu
 * @Time 2017/6/23 --14:38.
 * @Email 87683202@qq.com
 */
public class CommondityAdapter extends BaseQuickAdapter<Commodity, BaseViewHolder> {
    public CommondityAdapter(@LayoutRes int layoutResId, @Nullable List<Commodity> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Commodity item) {
            helper
                    .setText(R.id.commdity_name,item.getName())
                    .setText(R.id.commdity_point,String.valueOf(item.getPoints()));
    }
}
